package kaler.radiovirsa.app.util;

import android.content.Context;
import android.net.ConnectivityManager;

public class UtilNetwork {

	/*
	 * Kiểm tra có connect internet hay không
	 */
	public static boolean isNetworkConnected(Context context) {
		ConnectivityManager cm = (ConnectivityManager) context
				.getSystemService(Context.CONNECTIVITY_SERVICE);
		return (cm.getActiveNetworkInfo() != null
				&& cm.getActiveNetworkInfo().isAvailable() && cm
				.getActiveNetworkInfo().isConnected());
	}
}
